package {
	import com.fellong.flash.flar.view.FlarBasicView;
	import com.fellong.flash.flar.detector.FlarDetector;

	/// FlarDetector Demo: a Miku Box and a Cow Box.
	public class FlarMikuDemo extends FlarBasicView {
		
		public function FlarMikuDemo() {
			super(true);
			FlarDetector._force_confidence = 0.7;
			FlarDetector._force_smooth = true;
			FlarDetector._force_delay = 1000;

			// initialize FlarObject
			var miku:FlarMikuBox = new FlarMikuBox();
			miku.up_detector.loadCode( 'Data/cube16_100_up.pat',16,100 );
			miku.down_detector.loadCode( 'Data/cube16_100_down.pat',16,100 );
			miku.right_detector.loadCode( 'Data/cube16_100_right.pat',16,100 );
			miku.left_detector.loadCode( 'Data/cube16_100_left.pat',16,100 );
			miku.front_detector.loadCode( 'Data/cube16_100_front.pat',16,100 );
			miku.back_detector.loadCode( 'Data/cube16_100_back.pat',16,100 );
			this.scene.addChild( miku );

			var cow:FlarCowBox = new FlarCowBox();
			cow.up_detector.loadCode( 'Data/aris16_100_up.pat',16,100 );
			cow.down_detector.loadCode( 'Data/aris16_100_down.pat',16,100 );
			cow.right_detector.loadCode( 'Data/aris16_100_right.pat',16,100 );
			cow.left_detector.loadCode( 'Data/aris16_100_left.pat',16,100 );
			cow.front_detector.loadCode( 'Data/aris16_100_front.pat',16,100 );
			cow.back_detector.loadCode( 'Data/aris16_100_back.pat',16,100 );
			this.scene.addChild( cow );
			
			this.scaleX = this.scaleY = 2;
			startRendering();
		}		
	}
}